home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bmultichoicedialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.8 KB  |  74 lines

  1. /* 
  2.  *
  3.  * $Id: k3bmultichoicedialog.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_MULTI_CHOICE_DIALOG_H_
  17. #define _K3B_MULTI_CHOICE_DIALOG_H_
  18.  
  19. #include <kdialog.h>
  20. #include <kstdguiitem.h>
  21. #include "k3b_export.h"
  22.  
  23. #include <qmessagebox.h>
  24.  
  25.  
  26. class QCloseEvent;
  27.  
  28. class LIBK3B_EXPORT K3bMultiChoiceDialog : public KDialog
  29. {
  30.   Q_OBJECT
  31.  
  32.  public:
  33.   K3bMultiChoiceDialog( const QString& caption,
  34.             const QString& text,
  35.             QMessageBox::Icon = QMessageBox::Information,
  36.             QWidget* parent = 0, const char* name = 0 );
  37.   ~K3bMultiChoiceDialog();
  38.  
  39.   /**
  40.    * Adds a new button. returns it's number starting at 1.
  41.    */
  42.   int addButton( const KGuiItem& );
  43.  
  44.   static int choose( const QString& caption,
  45.              const QString& text,
  46.              QMessageBox::Icon = QMessageBox::Information,
  47.              QWidget* parent = 0, 
  48.              const char* name = 0,
  49.              int buttonCount = 2,
  50.              const KGuiItem& b1 = KStdGuiItem::yes(),
  51.              const KGuiItem& b2 = KStdGuiItem::no(),
  52.              const KGuiItem& b3 = KStdGuiItem::no(),
  53.              const KGuiItem& b4 = KStdGuiItem::no(),
  54.              const KGuiItem& b5 = KStdGuiItem::no(),
  55.              const KGuiItem& b6 = KStdGuiItem::no() );
  56.              
  57.  public slots:
  58.   /**
  59.    * returnes the number of the clicked button starting at 1.
  60.    */
  61.   int exec();
  62.  
  63.  private slots:
  64.   void slotButtonClicked( int );
  65.  
  66.  private:
  67.   void closeEvent( QCloseEvent* );
  68.  
  69.   class Private;
  70.   Private* d;
  71. };
  72.  
  73. #endif
  74.